efform_onload = function ()
{
	var info = new EiInfo();
	$('#ef_region_inqu1').hide();
	EiCommunicator.send("ZMCG20", "query", info, ajax_chang_callback);
	
}; 

function fundiv(currentIndex,index){ 
	var info = new EiInfo(); 
	if(index ==0)
	{
		EiCommunicator.send("ZMCG20", "query", info, ajax_chang_callback);
	}else
	{
		var xx = path[index]+"&fdMineId="+$('#fdMineId').val()+"&fdParentId="+$('#fdParentId').val();
		var frame = frames[0];
		if ($(frame).attr("__src") != xx) {
			$(frame).attr("__src", xx);
			frame.src = xx;
			efform.setStatus(0, "正在加载...");
		}
	}
} 

var ajax_chang_callback = {
	onSuccess : function(eiInfo) {
		efwindow.hide();
		var grid = efgrid.getGridObject("ef_grid_result");
		grid.refresh(eiInfo);
		
	},
	onFail : function(eMsg) {
	}
};
var ajax_chang_callback2 = {
	onSuccess : function(eiInfo) {
		efwindow.hide();
		var grid = efgrid.getGridObject("ef_grid_detail");
		grid.refresh(eiInfo);
		
	},
	onFail : function(eMsg) {
	}
};
button_query_onclick = function (){
	efgrid.submitInqu( "ef_grid_result", "ZM","ZMCG20","query");
}

button_feedback_onclick = function (){ 
	var grid=isSelected("ef_grid_result");
	if (grid == 0)return;
	var grid = efgrid.getGridObject( "ef_grid_result"); 
	var rows = grid.getCheckedRows();//选中行数
	var status = grid.getCellValue(rows,0, TYPE_DATA )//获取状态信息
	var v = grid.getCellValue(rows,9, TYPE_DATA )//获取反馈内容
	
	if(status == "已反馈"){
		alert("只能对未反馈的记录进行操作！"); return;
	}
	if(v.trim()==""){
		EFAlert("反馈内容不能为空");
		return;
	}else{
		efgrid.submitForm("ef_grid_result", "ZM", "ZMCG20", "feedback", true);
	}
/*	var status=$('#result-1-fdStatus').val();
	alert(status);
	var ei_info=new EiInfo();
	ei_info.setByNodeObject(document.forms[0]); 
	if(ei_info.getBlock('inqu_status1').getRows(0)[0][9].trim()==""){
		EFAlert("反馈内容不能为空");
		return;
	}
	
	var info = getDetail("ef_region_result","inqu_status1");
	if (null != info) { 

	if(status =="已反馈" )
		{
		alert("只能对未反馈的记录进行操作！"); return;
		}*/
	/*window.location.reload();*/ 
//	var grid=isSelected("ef_grid_result");
//	if (grid == 0)return; 
//	var rows=grid.getCheckedRows();
//	for(var i=0;i<rows.length;i++)
//	{
//		if(grid.getCellValueByColumnName(rows[i],"fdStatus")!="未反馈")
//		{
//			EFAlert("只能对未反馈的记录进行操作！"); return;
//		}
//	}
//	

}

var ajax_callback = {
		onSuccess : function(eiInfo) {
			efwindow.hide(); 
			var grid = efgrid.getGridObject("ef_grid_result");
			grid.refresh(eiInfo);
		}, 
		onFail:function(eMsg)
		{
			alert("确认失败，原因："+eMsg);
		}
	}